package com.itheima.practice;

import com.itheima.practice.demo02.Student;

public class Test {
    public static void main(String[] args) {
        String str1 = new String("a");
        String str2 = "a";
        System.out.println(str1 == str2);
        System.out.println(str1.equals(str2));

        Student s1 = new Student("张三",23);
        Student s2 = new Student("张三",23);
        System.out.println(s1);

        System.out.println(s1 == s2);
        System.out.println(s1.equals(s2));
    }
}
